# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=dmtcp
pkgver=2.6.1rc1
pkgrel=2
pkgdesc='Distributed MultiThreaded CheckPointing'
url='http://dmtcp.sourceforge.net'
arch=('loong64' 'x86_64')
license=('LGPL')
depends=('bash' 'gcc-libs' 'glibc')
makedepends=('dash' 'emacs' 'gdb' 'java-environment' 'openmpi' 'procps-ng'
'python' 'screen' 'strace' 'tcsh' 'vim' 'zsh')
source=("https://downloads.sourceforge.net/project/$pkgname/${pkgver/rc*}/$pkgname-${pkgver/rc/~rc}.tar.gz")
sha256sums=('284c281b561a7518ee6eb0561baeca1fe33034e368c7a05bc3dcb9ffa434778d')
b2sums=('6cbec14ee94b251717b237d7ed6a7f4047997eec222b0ffb3d85384b319df5384b2fe0454f731824b07391ff2162219060448b934f0308c70c755bbed1268208')

build() {
  cd $pkgname-${pkgver/rc/~rc}
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc
  make
}

package() {
  make DESTDIR="$pkgdir" install -C $pkgname-${pkgver/rc/~rc}
}
